home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / misc / math / aYaSieve.readme < prev    next >
Text File  |  1998-01-05  |  4KB  |  100 lines

  1. Short:    Sieve of Eratosthenes prime test Ver 2.01
  2. Author:   madmax@uni-paderborn.de (Dirk Held)
  3. Uploader: madmax@uni-paderborn.de (Dirk Held)
  4. Type:     misc/math
  5.  
  6. Replaces  misc/math/aYaSieve
  7. Version:  2.01
  8.  
  9.                              AndYetAnotherSieve
  10.                              ~~~~~~~~~~~~~~~~~~
  11.  
  12.                     (the fastest prime-sieve at this time)
  13.                           (at least on the Amiga)
  14.  
  15. On  my system (A4k40+FPU+MMU,25 MHz, 16 MB RAM) it tests primes upto
  16.  
  17. 240.000.000 in about 106.4 seconds ! (+ 9.2 counting)
  18. 100.000.000 in about  41.1 seconds,  (+ 3.9    "    )
  19.  10.000.000 in about   3.5 seconds,  (+ 0.4    "    )
  20.   1.000.000 in about   0.3 seconds,  (+ 0.04   "    )
  21.  
  22. This Version isn´t faster, or has more features than the previous Version. I
  23. just merged the two Versions (68000/680x0) into one Soure and removed by the
  24. way a stupid bug in the 680x0-Version ...\-(
  25.  
  26. well..i could save about 6%, but the Size of the Program would be about 38 KB...
  27. More 3% are possible with a Program-size of 540 KB.....;-)
  28.  
  29. The time cost is about O(n*1.35) = O(n), this means, if the Programm calcs to a
  30. 10 times higher Number, the Program needs 13.5 times longer. The Runtime seems
  31. to be slightly superlinear. The Program needs about Number DIV 16 Bytes Memory.
  32.  
  33. Usage:
  34.  
  35. aYaSieve NUMBER/N,DISPLAY/S,TEST/S,LEN=LINELEN/K/N,HELP/S,FROM/K/N,DUMP/K/F
  36.  
  37.         HELP        prints Usage
  38.         NUMBER      to test 2..Number for primality (Number < 2^31)
  39.         DISPLAY     all Primes are printed
  40.         TEST        enter Numbers to factorize
  41.         LEN  <num>  Linewidth
  42.         FROM <num>  prints Primes starting with n
  43.         DUMP <file> saves the BitField to file, if NUMBER was given, or
  44.                     loads it from the file, if no number was given.
  45.  
  46. aYaSieve isn´t completely written in *pure* Amiga Modula-II anymore. 
  47. I used the builtin Assembler where appropriate.
  48. "Amiga Modula-2 Compiler 68881, 4.301d, 19.06.94, © AMSoft"
  49. Marcel Timmermans Cyclone-Compiler should do, too (with some slightly
  50. modifications of the Import-List and the Compiler-Options).
  51.  
  52. This Program runs on every Amiga with Kick 2.0
  53. (aYaSieve.000 for the 68000 and aYaSieve.020 for the 68020/30/40/60)
  54.  
  55. The Source is included now.
  56.  
  57. It is strictly ALLOWED to produce any aYaSieve-like program without
  58. my permission :). (But who really cares about it ? Proggis like these are`n
  59. usefull to factorise LARGE numbers (i.e. 100 or more digits), so why bother.
  60. Try KillPrime on Aminet instead (Hi Brice:).
  61.  
  62.                           *IMPORTANT*
  63.  
  64. If you have questions drop me a mail.
  65.  
  66. Hellos and Greetings going out to:
  67.  
  68.     - Brice Allenbrand, he forced me, to work even harder....(puuh)
  69.  
  70.     - Bill J. Phillips (he tested my Program (Version 1.1) on his A3000/60
  71.       its about 3 times faster then.
  72.  
  73.     - Larry Deering, for the inspiration he gave me, with his BlackKeySieve,
  74.       which he programmed on his urgh mhmm gnaagnagna .... PeeCee. It may be
  75.       even faster than mine (8-(. Although i can´t test or believe it yet,
  76.       because i haven´t the Source to port it to the Amiga, nor do i have a
  77.       C-Version of my Proggi, to port it to other Platforms (yet).
  78.  
  79.     - everyone, who´s able to code a at least 3% faster Version of
  80.       Eratothenes´s Sieve (according to Big-o Notation)
  81.  
  82.     - those guys, which prefer a REAL 32 Bit (or even 64 (SGI-O^2...)) Maschine,
  83.  
  84. Aetschi-Baetschis and Buuhs going out to:
  85.  
  86.      - nobody
  87.  
  88.  
  89. ============================= Archive contents =============================
  90.  
  91. Original  Packed Ratio    Date     Time    Name
  92. -------- ------- ----- --------- --------  -------------
  93.     7456    4384 41.2% 17-Nov-97 17:18:16 +aYaSieve.000
  94.     6632    4207 36.5% 17-Nov-97 17:18:32 +aYaSieve.020
  95.    42451    8480 80.0% 17-Nov-97 17:12:52 +aYaSieve.Mod
  96.     3435    1770 48.4% 17-Nov-97 16:42:48 +aYaSieve.ReadMe
  97.     1389     441 68.2% 17-Nov-97 17:25:28 +Init.Mod
  98. -------- ------- ----- --------- --------
  99.    61363   19282 68.5% 18-Nov-97 23:56:00   5 files
  100.